<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑记账本</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/css/layui.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/css/public.css"  media="all">
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>校长></span><span>优惠活动></span><span>优惠活动</span>
        </div>
        <div class="white-conter selsectSet">
            <div class="title-blue"><b>
                优惠活动</b></div>
            <div style="margin-top: 20px">
                <form class="layui-form" action="__CONTROLLER__/addsave" method="post">
                    <input type="hidden" value="{$map.id}" name="id">
                    <div class="layui-col-md6">
                        <div class="layui-col-md10">
                            <div class="form-item">
                                <div class="label-div" style="padding-top: 15px">
                                    <label class="form-label">活动名称</label>
                                </div>
                                <div class="input-block">
                                    <input type="text" name="name" value="{$map.name}" autocomplete="off" placeholder="请输入..." class="layui-input">
                                </div>
                            </div>
                            <div class="form-item" style="margin-top: 20px;">
                                <div class="label-div">
                                    <label class="form-label">活动开始日期</label>
                                </div>
                                <div class="input-block">
                                    <input type="text" name="stardate" id="date" lay-verify="date" placeholder="请选择" value="{$map.startime}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="form-item" style="margin-top: 20px;">
                                <div class="label-div">
                                    <label class="form-label">活动开始日期</label>
                                </div>
                                <div class="input-block">
                                    <input type="text" name="stopdate" id="date2" lay-verify="date" placeholder="请选择" value="{$map.stoptime}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="form-item">
                                <div class="label-div" style="padding-top: 0px">
                                    <label class="form-label">优惠金额</label>
                                </div>
                                <div class="input-block">
                                    <input type="number" name="money" value="{$map.amount}" autocomplete="off" placeholder="请输入..." class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="label-div" >
                                    <label class="form-label">课程</label>
                                </div>
                                <div class="layui-input-inline">
                                    <select name="kid">
                                        <foreach name="curlist" item="sx" key="kx">
                                            <option value="{$sx['id']}" <if condition="$map.bid eq $sx['id']">selected</if>>{$sx['cname']}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="label-div" style="padding-top: 15px">
                                    <label class="form-label">状态</label>
                                </div>
                                <div class="layui-input-inline">
                                    <select name="status">
                                        <foreach name="status" item="sa" key="ka">
                                            <option value="{$ka}" <if condition="$map.status eq $ka">selected</if> >{$sa}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="form-item">
                                <div class="label-div" style="padding-top: 15px">
                                    <label class="form-label">备注</label>
                                </div>
                                <div class="input-block">
                                    <input type="text" name="mark" value="{$map.mark}" autocomplete="off" placeholder="请输入..." class="layui-input">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12" style="margin-top: 50px;">
                        <!--<div class="button-block">-->
                            <button class="layui-btn layui-btn-xs layui-btn-normal" lay-submit="" style="height: 30px;width: 60px;">提交</button>
                            <a  class="layui-btn layui-btn-xs btn-grey" style="height: 30px;width: 60px;line-height: 30px;" href="__CONTROLLER__/index">返回</a>
                        <!--</div>-->
                    </div>
                </form>
            </div>
        </div>

    </div>

</div>




<script src="__PUBLIC__/js/layui.all.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;
        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });
        laydate.render({
            elem: '#date2'
        });

    });
</script>
</body>
</html>